Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose own properties of scopes publicly #594

Merged
merged 2 commits into from
Sep 28, 2023
Merged

Expose own properties of scopes publicly #594

merged 2 commits into from
Sep 28, 2023

Conversation

sebastienros
Copy link
Owner

Fixes #553

@sebastienros
Copy link
Owner Author

@MrUpsideDown

/// <summary>
/// Sets the value with the specified name in the current scope.
/// </summary>
public void SetOwnValue(string name, FluidValue value)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe [MethodImpl(MethodImplOptions.AggressiveInlining)]?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's your approach with that, I am tending to let the JIT decide these days because I don't have a benchmark that proves it better. But do you think it can never be worse than not having it?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JIT can help and be wise, but probably not on full framework. I made the comment mostly because you converted from direct field access to method so call site would more likely have old behavior with aggressive inlining.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I assume it doesn't hurt to add it whatsoever so I am adding it back.

@sebastienros sebastienros merged commit e4bb7d1 into main Sep 28, 2023
1 check passed
@sebastienros sebastienros deleted the sebros/scope branch September 28, 2023 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Child Scope Does Not Modify Outer Scope Variables
2 participants